<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻管理</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        .container {
            width: 80%;
            margin: 20px auto;
            overflow: hidden;
            background: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        header {
            background: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
        }
        nav {
            display: flex;
            justify-content: center;
            background: #555;
            padding: 10px 0;
        }
        nav a {
            color: white;
            text-decoration: none;
            padding: 0 15px;
        }
        nav a:hover {
            background: #444;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 12px;
            text-align: left;
        }
        th {
            background-color: #333;
            color: #fff;
        }
        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        .actions {
            text-align: center;
        }
        .edit, .delete {
            padding: 5px 10px;
            background: #333;
            color: #fff;
            border: none;
            cursor: pointer;
            text-decoration: none;
            margin: 2px;
            display: inline-block;
        }
        .edit:hover, .delete:hover {
            background: #444;
        }
        footer {
            background: #333;
            color: #fff;
            text-align: center;
            padding: 10px 0;
            position: relative;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <header>
        <h1>新闻管理</h1>
    </header>
    <nav>
        <a href="index.html">返回首页</a>
        <a href="build.html">发布新闻</a>
        <a href="reviews.html">评论管理</a>
    </nav>
    <div class="container">
        <h2>新闻列表</h2>
        <table>
            <thead>
                <tr>
                    <th>标题</th>
                    <th>发布日期</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody class="tbody">
                 <tr>
					<td>标题</td>
					<td>发布日期</td>
					<td class="actions">
						<a href="edit_news.php?id=${item.id}" class="edit">编辑</a>
						<a href="javascript:void(0);" onclick="deleteById('${item.id}')" class="delete">删除</a>
					</td>
				</tr>
            </tbody>

            <!-- 复制上面的 <tr> 来创建更多的新闻条目 -->
        </table>
    </div>
    <footer>
        <p>版权所有 © 2024 新闻网站</p>
    </footer>
</body>
</html>